<div id="modalAdd" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">

            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">Modal Add</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">
                <form class="form-horizontal form-label-left" action="javascript:void(0)">
                    <div class="item form-group">
                        <label class="col-form-label col-md-3 col-sm-3 label-align">Permission <span
                                class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 ">
                            <input type="text" v-model="resource.permission" class="form-control"
                                placeholder="Resources Name" required="" />
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="col-form-label col-md-3 col-sm-3 label-align">Roles <span
                                class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 checkbox">
                            <div style="margin-top: 6px">
                                <span v-for="(role, index) in roles" style="padding: 20px 0">
                                    <input v-model="resource.roles" type="checkbox" :value="role.id" />{{role.roleName}}
                                </span>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                <button type="button" @click="insertModal()" class="btn btn-primary">Save changes</button>
            </div>

        </div>
    </div>
</div>